//
//  UILable+Extension.swift
//  sinaOnceAgain
//
//  Created by 王相超 on 16/2/17.
//  Copyright © 2016年 chuanzhi. All rights reserved.
//

import UIKit


//给UILabel做kuoz

extension UILabel {
    
    
    //便利构造函数
    
    convenience init(text: String,fontSize: CGFloat,textColor: UIColor,alignment: NSTextAlignment = .Center) {
    
        //获取一个UILabel类型的对象
        self.init()
        
        self.text = text
        font = UIFont.systemFontOfSize(fontSize)
        self.textColor = textColor
        //设置行数为0
        numberOfLines = 0
        //设置对齐
        textAlignment = alignment
        //适应大小
        sizeToFit()
    
    }
    
    
    
}
